import API from './api';
import http from '../plugin/http';
import type { IBillReqParamsModal, RuleForm } from '../type';

const getBills = async (params: IBillReqParamsModal) => {
    return await http.get(API.BILL_GETBLLS, {
        params
    })
};

const getBill = async (params: IBillReqParamsModal) => {
    return await http.get(API.BILL_GETBLL, {
        params
    })
};

const updateBill = async (params: IBillReqParamsModal) => {
    return await http.post(API.BILL_UPDATEBILL, params)
};

const addBill = async (params: RuleForm) => {
    return await http.post(API.BILL_ADD, params)
};

export default {
    getBills,
    getBill,
    updateBill,
    addBill,
}